package com.dv.driverless.service.impl;

import java.util.List;

import com.dv.driverless.domain.BasicVehicle;
import com.dv.driverless.domain.vo.BasicVehicleVo;
import com.dv.driverless.mapper.BasicVehicleMapper;
import com.dv.driverless.service.IBasicVehicleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 车辆信息表Service业务层处理
 *
 * @author ruoyi
 * @date 2023-04-02
 */
@Service
public class BasicVehicleServiceImpl implements IBasicVehicleService
{
    @Autowired
    private BasicVehicleMapper basicVehicleMapper;

    /**
     * 查询车辆信息表
     *
     * @param id 车辆信息表主键
     * @return 车辆信息表
     */
    @Override
    public BasicVehicle selectBasicVehicleById(Long id)
    {
        return basicVehicleMapper.selectBasicVehicleById(id);
    }

    /**
     * 查询车辆信息表列表
     *
     * @param basicVehicleVo 车辆信息表
     * @return 车辆信息表
     */
    @Override
    public List<BasicVehicleVo> selectBasicVehicleList(BasicVehicleVo basicVehicleVo)
    {
        return basicVehicleMapper.selectBasicVehicleList(basicVehicleVo);
    }

    /**
     * 新增车辆信息表
     *
     * @param basicVehicle 车辆信息表
     * @return 结果
     */
    @Override
    public int insertBasicVehicle(BasicVehicle basicVehicle)
    {
        return basicVehicleMapper.insertBasicVehicle(basicVehicle);
    }

    /**
     * 修改车辆信息表
     *
     * @param basicVehicle 车辆信息表
     * @return 结果
     */
    @Override
    public int updateBasicVehicle(BasicVehicle basicVehicle)
    {
        return basicVehicleMapper.updateBasicVehicle(basicVehicle);
    }

    /**
     * 批量删除车辆信息表
     *
     * @param ids 需要删除的车辆信息表主键
     * @return 结果
     */
    @Override
    public int deleteBasicVehicleByIds(Long[] ids)
    {
        return basicVehicleMapper.deleteBasicVehicleByIds(ids);
    }

    /**
     * 删除车辆信息表信息
     *
     * @param id 车辆信息表主键
     * @return 结果
     */
    @Override
    public int deleteBasicVehicleById(Long id)
    {
        return basicVehicleMapper.deleteBasicVehicleById(id);
    }

    /**
     * 修改车辆状态
     *
     * @param basicVehicle
     * @return 结果
     */
    @Override
    public int changeBasicVehicle(BasicVehicle basicVehicle) {
        return basicVehicleMapper.changeBasicVehicle(basicVehicle);
    }
}
